package com.shuiyun.jtt.message.jt808.extend;

import com.shuiyun.jtt.utils.codec.DataType;
import com.shuiyun.jtt.utils.codec.FieldValue;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;


/**
 * 路线 - 拐点
 */
@Data
public class InflectionPoint {

    @FieldValue(type = DataType.DWORD,desc = "拐点ID")
    @ApiModelProperty(value = "拐点ID",example = "1")
    private Integer id;

    @FieldValue(type = DataType.DWORD,desc = "线路ID")
    @ApiModelProperty(value = "线路ID",example = "1")
    private Integer routeId;

    @FieldValue(type = DataType.DWORD,desc = "纬度")
    @ApiModelProperty(value = "纬度",example = "30554380")
    private Integer latitude;

    @FieldValue(type = DataType.DWORD,desc = "经度")
    @ApiModelProperty(value = "经度",example = "104064048")
    private Integer longitude;

    @FieldValue(type = DataType.BYTE,desc = "宽度")
    @ApiModelProperty(value = "宽度",example = "10")
    private Integer width;

    @FieldValue(type = DataType.WORD,desc = "属性")
    @ApiModelProperty(value = "属性",example = "0",notes = "" +
            "bit0-行驶时间" +
            "bit1-限速" +
            "bit2-南纬" +
            "bit3-西经")
    private Integer attribute;

    @FieldValue(type = DataType.DWORD,desc = "线路行驶过长(s)",checkMethod = {"attribute","&!","1"})
    @ApiModelProperty(value = "线路行驶过长(s)",example = "21600")
    private Integer overTravel;

    @FieldValue(type = DataType.DWORD,desc = "线路行驶不足(s)",checkMethod = {"attribute","&!","1"})
    @ApiModelProperty(value = "线路行驶不足(s)",example = "600")
    private Integer lessTravel;

    @FieldValue(type = DataType.WORD,desc = "最高速度(km/h)",checkMethod = {"attribute","&!","2"})
    @ApiModelProperty(value = "最高速度(km/h)",example = "100")
    private Integer maxSpeed;

    @FieldValue(type = DataType.BYTE,desc = "超速持续时间(s)",checkMethod = {"attribute","&!","2"})
    @ApiModelProperty(value = "超速持续时间(s)",example = "120")
    private Integer duration;

    @FieldValue(type = DataType.WORD,desc = "夜间限速(km/h)",checkMethod = {"attribute","&!","2"})
    @ApiModelProperty(value = "夜间限速(km/h)",example = "100")
    private Integer nightSpeed;
}
